<template>
<el-form-item label="性别">
  <el-radio-group v-model="current">
    <el-radio :label="1">男</el-radio>
    <el-radio :label="2">女</el-radio>
  </el-radio-group>
</el-form-item>
</template>

<script>
// http://cn.vuejs.org/v2/guide/components.html#使用自定义事件的表单输入组件
  export default {
    name: 'sexRadio',
    data () {
      return {
        current: this.sex // 绑定
      }
    },
    props: ['sex'],
    watch: {
      current (val) {
        this.$emit('input', val)
      }
    }
  }
</script>
